# CMake 最低版本号要求
cmake_minimum_required (VERSION 2.8)

# 项目信息
project (rikibot_foc_ctrl)
add_compile_options(-std=c++11)

find_package(Boost 1.55.0 REQUIRED COMPONENTS system filesystem)

set(CMAKE_THREAD_LIBS_INIT "-lpthread")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(CMAKE_USE_WIN32_THREADS_INIT 0)
set(CMAKE_USE_PTHREADS_INIT 1)
set(THREADS_PREFER_PTHREAD_FLAG ON)
include_directories(rikibot_foc_ctrl ${Boost_INCLUDE_DIRS})
link_directories(rikibot_foc_ctrl ${Boost_LIBRARY_DIRS})


# 查找目录下的所有源文件
# 并将名称保存到 DIR_SRCS 变量
aux_source_directory(. DIR_SRCS)

# 指定生成目标
add_executable(rikibot_foc_ctrl ${DIR_SRCS})
target_link_libraries(rikibot_foc_ctrl ${Boost_LIBRARIES})
